package com.liliudong.template.biz.service.sys;

import com.liliudong.template.common.entity.sys.SysDictItem;
import com.mybatisflex.core.service.IService;

import java.util.List;
import java.util.Map;

/**
 * 服务
 *
 * @author liudo
 * @date 2024-08-01 20:27:02
 */
public interface SysDictItemService extends IService<SysDictItem> {

    /**
     * 批量保存
     *
     * @param dictId       字典ID
     * @param sysDictItems 系统项
     */
    void saveBathByDictId(Long dictId, List<SysDictItem> sysDictItems);

    /**
     * 按字典id计数
     *
     * @param dictId 字典id
     * @return long
     */
    long countByDictId(Long dictId);

    /**
     * 按字典id删除
     *
     * @param dictId 字典id
     */
    void removeByDictId(Long dictId);

    /**
     * 按字典id列出
     *
     * @param dictId 字典id
     * @return {@link List }<{@link SysDictItem }>
     */
    List<SysDictItem> listByDictId(Long dictId);

    /**
     * 按字典ID列出地图
     *
     * @param dictIds 字典ID
     * @return {@link Map }<{@link Long }, {@link List }<{@link SysDictItem }>>
     */
    Map<Long, List<SysDictItem>> listMapsByDictIds(List<Long> dictIds);
}
